<template>
  <div id="app">
    <div class="tourism-content">
      <el-header style="width: 100%; height: 53px; padding:0;" class="top-header">
        <div class="head-logo">
          <!-- <a href="http://www.mafengwo.cn/" class="logo"></a> -->
        </div>
        <el-row class="el-row-header">
          <el-col :span="9" :offset="5">
            <div class="grid-content">
              <el-menu
                background-color="#fff"
                text-color="#333"
                active-text-color="#ffd04b"
                :default-active="activeIndex"
                class="el-menu-header"
                mode="horizontal"
                @select="handleSelect"
                :router="true"
              >
                <el-menu-item
                  v-for="list in menuData"
                  :key="list.id"
                  :index="list.href"
                >{{ list.title }}</el-menu-item>
              </el-menu>
            </div>
          </el-col>
          <el-col :span="4">
            <div class="grid-content search-content">
              <el-input placeholder="请输入内容" prefix-icon="el-icon-search"></el-input>
            </div>
          </el-col>
          <el-col :span="3">
            <div class="login-out">
              <a
                class="weibo-login"
                href="https://passport.mafengwo.cn/weibo"
                title="微博登录"
                rel="nofollow"
              ></a>
              <a
                class="qq-login"
                href="https://passport.mafengwo.cn/qq"
                title="QQ登录"
                rel="nofollow"
              ></a>
              <a
                class="weixin-login"
                href="https://passport.mafengwo.cn/wechat"
                title="微信登录"
                rel="nofollow"
              ></a>
              <a @click="login" id="_j_showlogin" title="登录" rel="nofollow">登录</a>
              <span class="split">|</span>
              <a @click="register" title="注册帐号" rel="nofollow">注册</a>
            </div>
          </el-col>
        </el-row>
      </el-header>
      <el-container class="main-content" style="width: 100%;">
        <router-view></router-view>
      </el-container>
      <el-footer style="width: 100%; height: 80px;" class="bottom-footer">
        <p>© 2019 CopyRight ZangSuYun</p>
      </el-footer>
    </div>
  </div>
</template>
<script>
export default {
  name: 'app',
  data() {
    return {
      activeIndex: './',
      menuData: [
        {
          id: '1',
          title: '首页',
          href: './'
        },
        {
          id: '2',
          title: '旅行攻略',
          href: '/strategy'
        },
        {
          id: '3',
          title: '酒店推荐',
          href: '/hotelDetail'
        },
        {
          id: '4',
          title: '美食景点',
          href: '/sceneryDetail'
        },
        {
          id: '5',
          title: '旅游资讯',
          href: '/c'
        },
        {
          id: '6',
          title: '搜索景区',
          href: '/map'
        }
      ]
    }
  },
  mounted: function() {
    // const h = this.$createElement
    // this.$notify({
    //   title: '2019新年出游计划',
    //   message: h(
    //     'div',
    //     { style: 'color: red;font-weight: bold;font-size: 30px;' },
    //     '全场最高立减五百元'
    //   ),
    //   duration: 50000
    // })
  },
  methods: {
    handleSelect(key, keyPath) {
      this.activeIndex = key
      console.log(key, keyPath)
    },
    login() {
      this.$router.push({
        path: '/login'
      })
    },
    register() {
      this.$router.push({
        path: '/register'
      })
    }
  }
}
</script>
<style scoped>
* {
  margin: 0;
  padding: 0;
}

html,
body,
#app,
.tourism-content {
  width: 100%;
  height: 100%;
  /* background: #f0f2f5; */
}

a:link,
a:visited,
a:hover,
a:active {
  text-decoration: none;
}
.el-menu-item:hover {
  color: #fff !important;
  background: #ff9d00 !important;
}

ul > li {
  list-style-type: none;
}

.top-header {
  background: #fff;
}
.top-header .head-logo {
  float: left;
  padding: 16px 0 13px;
  width: 136px;
  height: 39px;
  position: absolute;
  left: 240px;
}
.top-header .head-logo .logo {
  display: block;
  height: 39px;
  background: url(./header-sprites15.png) no-repeat 0 0;
  position: relative;
}
.login-out {
  float: right;
  padding: 21px 0;
  height: 26px;
  line-height: 26px;
  color: #c9c9c9;
  text-align: right;
}
.login-out a {
  font-size: 14px;
  background-color: transparent;
  text-decoration: none;
  color: #ff9d00;
  cursor: pointer;
}
.login-out .split {
  display: inline-block;
  margin: 0 10px;
  width: 1px;
  height: 14px;
  background-color: #c9c9c9;
  overflow: hidden;
  vertical-align: -2px;
}
.weibo-login,
.qq-login,
.weixin-login {
  display: inline-block;
  margin-right: 6px;
  width: 26px;
  height: 26px;
  background-image: url(./header-sprites15.png);
  background-position: 0 -50px !important;
  overflow: hidden;
  vertical-align: -7px;
}
.login-out .weibo-login:hover {
  background-position: 0 -80px !important;
}
.login-out a:hover {
  outline: 0;
  text-decoration: underline;
  color: #ff8a00;
}
.login-out .qq-login:hover {
  background-position: -30px -80px !important;
}
.login-out .weixin-login:hover {
  background-position: -30px -165px !important;
}

.login-out .qq-login {
  background-position: -30px -50px !important;
}
.login-out .weixin-login {
  background-position: 0 -165px !important;
}
.bottom-footer {
  background: #e3e4e8;
  line-height: 80px;
  color: #8a8686;
  text-align: center;
}

.main-content {
  margin: 0px auto;
}

.top-header .el-row-header {
  /* background-color: #fff; */
  height: 68px;
}

.top-header .el-menu-header {
  border-bottom: 0;
}

.top-header .el-menu-header .el-menu-item {
  font-size: 18px;
  line-height: 68px;
  height: 68px;
}

.top-header .text-shadow {
  text-shadow: #f7e207 0 0 10px;
  color: white;
  font-size: 60px;
}

.top-header .el-col-phone {
  height: 90px;
  line-height: 120px;
  font-size: 25px;
}

.top-header .tel {
  font-family: Arial, 'Lucida Grande', 'Microsoft Yahei', 'Hiragino Sans GB',
    'Hiragino Sans GB W3', SimSun, 'PingFang SC', STHeiti;
  color: #c00;
}

.search-content {
  height: 60px;
  line-height: 68px;
  box-sizing: border-box;
}

.el-notification__group {
  cursor: default;
}
</style>
